<?php 
require_once 'class.upload.php'; 
$handle = new Upload($_FILES['file']);
$handle->allowed = 'image/*'; 
 ($handle->uploaded){
 	$handle->Process('uploads'); 
 	if($handle->processed) { 
 		echo 'Image uploaded'; 
 	} else { 
 		echo 'error'; 
 	} 
 } 